SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[SP_DELETE_USER](@LOGIN VARCHAR(25),@PASS VARCHAR(25)) AS
 
 IF NOT EXISTS(SELECT 1 FROM T_USER WHERE USER_LOGIN=@LOGIN)
 BEGIN
 SELECT 'NO SE ENCONTRO EL USUARIO'
 RETURN 0
 END
 
 
 BEGIN TRY

 UPDATE T_USER
 SET USER_STATUS=0
 WHERE USER_LOGIN=@LOGIN
 SELECT 'SUCCESS'
 RETURN 1
 END TRY
 BEGIN CATCH
	SELECT 
		ERROR_MESSAGE(),
		ERROR_LINE()
	RETURN 0
	
END CATCH
GO
